export class Button { }

export class Color {
    public constructor(
        public r: number,
        public g: number,
        public b: number,
        public a: number,
    ) { }
}

export class EditBox {
    backgroundImage?: any;
    placeholderLabel?: any;
}

export class Label {
    public color: any;
    public fontSize?: number;
    public horizontalAlign?: number;
    public isBold?: boolean;
    public isItalic?: boolean;
    public isUnderline?: boolean;
    public lineHeight?: number;
    public string?: string;
    public verticalAlign?: number;
}

export type LabelOutline = Partial<{
    color: any;
    width: number;
}>

export type LabelShadow = Partial<{
    blur: number;
    color: any;
    offset: number;
}>

export class Layers {
    public static Enum = {
        UI_2D: 'ui'
    };
}

export class Layout {
    public static Type = {
        GRID: 'GRID'
    };

    public type?: string;
}

export class Node {
    public layer: any;
    public parent: any;
    public position: any;
    public scale: any;
    public worldPosition: any;

    public constructor(public name: string) { }
    public getComponent(_component: any): any { };
    public walk(_fun: (child: Node) => void) { };
}

export class ProgressBar {
    public static Mode = {
        FILLED: 2
    };

    public totalLength = 0;
    public barSprite?: any;
    public progress?: number;
}

export class Sprite {
    public static FillType = {
        RADIAL: 2
    };

    public static SizeMode = {
        TRIMMED: 'TRIMMED'
    };

    public static Type = {
        SLICED: 1,
        FILLED: 3
    };

    public spriteFrame: any;
    public sizeMode?: string;
}

export class Toggle {
    public checkMark?: any;
}

export class ToggleContainer { }

export class UITransform {
    public height?: number;
    public width?: number;
    public anchorPoint?: Vec2;

    public addComponent() {

    }
}

export class UIOpacity {
    public opacity?: number
}

export class Vec2 {
    public constructor(
        public x: number,
        public y: number,
    ) { }
}

export class Vec3 {
    public constructor(
        public x: number,
        public y: number,
        public z: number,
    ) { }
}
